<?php
/**
 * home/index.phtml
 * Vue par défaut du HomeController
 */
?>
<?php
$title = "Page d'accueil";
$this->headTitle($title);
?>
<div class='content-head'>
    <h3><?php echo $title ?></h3>
</div>
<div class='content-body'>
    <div class="content-widget">
	<div class="content-widget-title"><!--TACHES--></div>
	<div id="taches" class="content-widget-content">
	    <!-- LISTE DES TACHES -->
	</div>
    </div>
</div>

<div id="app-messenger" class="hide"></div>

<script type="text/javascript">
<?php
/**
 * Affichage du contenu du tableau des messages
 * 
 * @param array $array
 */
function showMessage($array){
    echo (count($array) > 0) ? '<ul>' : '';
    foreach($array as $arr){
	if(is_array($arr)){
	    echo showMessage($arr);
	}else{
	    echo '<li>' .$arr .'</li>';
	}
    }
    echo (count($array) > 0) ? '</ul>' : '';
}
?>
    $(function(){
	msg = "<?php echo addslashes(showMessage($this->msg)); ?>";
	if(msg.length > 20){
	    $('#app-messenger').html(msg);
	    //$('#user-icon').blink();
	}
    });
</script>
